package com.youkeda.test.j3.c3;

import java.util.Random;

/**
 * @author xshuai
 */
public class LineUp implements Runnable {
    public static void main(String[] args) {
        LineUp lineUp1 = new LineUp();
        Thread thread1 = new Thread(lineUp1);
        LineUp lineUp2 = new LineUp();
        Thread thread2 = new Thread(lineUp2);
        thread1.setName("钱三一");
        thread2.setName("林妙妙");
        thread1.start();
        thread2.start();
    }

    @Override
    public void run() {
        Random random = new Random();
        System.out.println(Thread.currentThread().getName() + (int) (Math.random() * 10));
    }
}
